/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

import java.io.FileWriter;
import java.io.PrintWriter;

/**
 * <p>Project: jse2303 - Output1
 * <p>Powered by webrx On 2023-07-11 09:23:54
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Output1 {
    public static void main(String[] args) {
        //输出不换行，必须有输出内容
        System.out.print(2 * 3 + "\r\n");

        //输出换行
        System.out.println(3 * 4);
        //输出空行
        System.out.println();

        //格式化输出
        System.out.printf("%d %02d %03d %04d%n", 1, 2, 3, 4);

        System.err.println("成功");

        //输出消息对象框 了解
        //JOptionPane.showMessageDialog(null, "hello");

        //输入内容到文件中 了解
        try (var out = new PrintWriter(new FileWriter("c:/users/administrator/desktop/user.txt"))) {
            out.printf("现在时间：%tF %<tT。今日是：%<tA\r\n", System.currentTimeMillis());
        } catch (Exception e) {
        }


    }
}
